<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="最爱古风小雷丘">
    <title></title>
    <style>
        body {
            margin: 0;
        }

        * {
            box-sizing: border-box;
        }

        ul {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        a {
            text-decoration: none;
            color: inherit;
            font-size: inherit;
            display: inline-block;
            height: 100%;
            width: 100%;
        }

        .container {
            width: 1300px;
            margin: 0 auto;
        }

        header {
            margin: 0 auto;
            background-color: #292929;
            height: 55px;
            line-height: 55px;
        }

        .first {
            display: flex;
        }

        .first>li {
            color: #C7C7C7;
            font-size: 14px;
            padding-left: 30px;
            padding-right: 30px;
        }

        .first>li:nth-child(1) {
            padding-left: 0;
        }

        .first>li:nth-child(2) {
            position: relative;
        }

        .first .one {
            color: #CBA45C;
        }

        .first .second {
            background-color: #363A3D;
            width: 120px;
             height: 90px; 
            position: absolute;
            left: 10px;
             display: none;  
        }

        .first .second>li {
            padding-left: 15px;
              height: 40px;  
              line-height: 40px;
        }

        .first>li:nth-child(2) {
            position: relative;
        }

        .first .one {
            color: #CBA45C;
        }


        .first .third {
            background-color: #363A3D;
            width: 90px;
            height: 180px;
            position: absolute;
            left: 10px; 
             display: none;  
        }

        .first .third>li {
             padding-left: 18px; 
             height: 40px;
             line-height: 40px;
        }

        .first>li:nth-child(3) {
            position: relative;
        }

        .first .one {
            color: #CBA45C;
        }
        .first>li:hover .color{
            color: #CBA45C;
        }
        .first li:nth-child(2):hover .second{
              display: block;
        }  
        .first li:nth-child(3):hover .third{
              display: block;
        } 
        .first .second li:hover{
            background-color: rgba(1, 0.5, 0.5, 0.5);
        }
        .first .third li:hover{
            background-color: rgba(1, 0.5, 0.5, 0.5);
        }
    </style>
</head>

<body>
    <header>
        <div class="container">
            <ul class="first">
                <li class="one"><a href="#" class="color">会员首页</a></li>

                <li>
                    <a href="#" class="color">看电影</a>
                    <ul class="second">
                        <li><a href="#">华语电影</a></li>
                        <li><a href="#">海外大片</a></li>
                    </ul>
                </li>

                <li>
                    <a href="#" class="color">看剧</a>
                    <ul class="third">
                        <li><a href="#">英剧</a></li>
                        <li><a href="#">美剧</a></li>
                        <li><a href="#">港剧</a></li>
                        <li><a href="#">韩剧</a></li>
                    </ul>
                </li>
                <li><a href="#" class="color">看动漫</a></li>
                <li><a href="#" class="color">纪录片</a></li>
                <li><a href="#" class="color">德云社</a></li>
                <li><a href="#" class="color">看直播</a></li>
            </ul>
        </div>
    </header>
</body>

</html>
<script>
    // 点击切换主页 

    // var firstLis = document.querySelectorAll('.first li .color');
    // console.log(firstLis)
    // for(var i = 0; i < firstLis.length;i++){
    //     firstLis[i].index = i;
    //     var lastindex = 0;
    //     firstLis[i].onclick = function(){
            
    //         firstLis[lastindex].className = '';
    //         firstLis[this.index].className = 'one';
    //         lastindex = this.index;
    //     }
    // }


</script>